Skip to content

use .null? to test NULL pointer returns#420

Merged
jcupitt merged 4 commits into
masterfrom
better-null-test
Jul 17, 2025
Merged

use .null? to test NULL pointer returns#420
jcupitt merged 4 commits into
masterfrom
better-null-test

Conversation

@jcupitt

@jcupitt jcupitt commented Jul 17, 2025

Copy link
Copy Markdown
Member

we were using .nil? in a couple of cases

see #419

thanks dloebl

we were using `.nil?` in a couple of cases

see #419

thanks dloebl
@jcupitt

jcupitt commented Jul 17, 2025

Copy link
Copy Markdown
Member Author

@dloebl I added your coffee GIF to the samples, I hope that's OK.

If anyone could double-check that I got all the possible null pointers, that'd be great.

Comment thread lib/vips/image.rb
@dloebl

dloebl commented Jul 17, 2025

Copy link
Copy Markdown

I added your coffee GIF to the samples, I hope that's OK.

Thanks! That's fine. It's a public domain (CC0) image I got from here and altered some bytes to make it invalid: https://pixabay.com/gifs/coffee-cup-mug-pixel-art-steam-19613

If anyone could double-check that I got all the possible null pointers, that'd be great.

Looks good to me! I've searched through the code as well and wasn't able to find other instances

@jcupitt jcupitt merged commit 726357f into master Jul 17, 2025
22 checks passed
@jcupitt jcupitt deleted the better-null-test branch July 17, 2025 13:19
@jcupitt

jcupitt commented Jul 17, 2025

Copy link
Copy Markdown
Member Author

\o/ thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants